<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>lianxi</title>
</head>
<style type="text/css">
	.box{
		height: 400px;
		width: 400px;
		background-color: red;
	}
	.box2{
		height: 400px;
		width: 400px;
		background-color: #6e6e6e;
	}
	.son{
		height: 200px;
		width: 200px;
		background-color: blue;
	}
</style>
<script type="text/javascript">
	window.onload = function  () {
		box = document.getElementsByClassName("box");
		son = document.getElementsByClassName("son")

		son[0].parentNode.parentNode.childNodes[1].nextSibling.nextSibling.style.backgroundColor='yellow'
		
	}
</script>
<body>
	<div class="box">
		<div class="son"></div>
	</div>
	<div class="box2"></div>
</body>
</html>